import requests from '@/utils/request-proxy'

//添加轮播图数据
export const reqAddCarousel = (data) => requests({ url: `/image/add`, method: 'post', data })

//分页获取轮播图数据
export const reqGetCrouselByPage = (currentPage, size) => requests({ url: `/image/page/${currentPage}/${size}`, method: 'get' })

//主题查询
export const reqGetByTopic = (topic) => requests({ url: `/image/${topic}`, method: 'get' })

//主题查询(分页)
export const reqGetPageByTopic = (currentPage, size, topic) => requests({ url: `/image/page/${currentPage}/${size}/${topic}`, method: 'get' })

//主题查询
export const reqsetUsing = (id) => requests({ url: `/image/update/${id}`, method: 'put' })

//修改轮播图
export const reqUpdateCarousel = (data) => requests({ url: `/image`, method: 'put', data })

//根据id删除轮播图记录
export const reqDeleteCarousel = (id) => requests({ url: `/image/${id}`, method: 'delete' })

